package com.jmyd.sharding.base.service.impl;

import com.jmyd.sharding.base.dto.BaseQueryDto;
import com.jmyd.sharding.base.dto.KeywordQueryDto;
import com.jmyd.sharding.base.dto.PageParam;
import com.jmyd.sharding.base.service.IBaseService;
import com.jmyd.sharding.base.vo.PageBean;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 公共Service接口实现类
 *
 * @param <PK> 业务主键
 * @param <D>  业务Dto
 * @param <V>  业务Vo
 * @author samphin
 * @date 2019-10-24 11:34:58
 */
public abstract class BaseServiceImpl<PK extends Serializable, D, V> implements IBaseService<PK, D, V> {

    @Override
    public boolean saveBatch(List<D> dto) {
        return false;
    }

    @Override
    public boolean save(D dto) {
        return false;
    }

    @Override
    public boolean save(D dto, HttpServletRequest httpServletRequest) {
        return false;
    }

    @Override
    public boolean saveSelective(D dto) {
        return false;
    }

    @Override
    public boolean saveSelective(D dto, HttpServletRequest httpServletRequest) {
        return false;
    }

    @Override
    public boolean updateById(D dto) {
        return false;
    }

    @Override
    public boolean updateById(D dto, HttpServletRequest httpServletRequest) {
        return false;
    }

    @Override
    public boolean updateByIdSelective(D dto) {
        return false;
    }

    @Override
    public boolean updateByIdSelective(D dto, HttpServletRequest httpServletRequest) {
        return false;
    }

    @Override
    public boolean deleteById(PK id) {
        return false;
    }

    @Override
    public boolean deleteBatch(List<PK> ids) {
        return false;
    }

    /**
     * 无条件查询
     */
    @Override
    public List<V> queryList() {
        return new ArrayList<>(1);
    }

    /**
     * 条件查询
     *
     * @param dto
     */
    @Override
    public List<V> queryListByCondition(D dto) {
        return new ArrayList<>(1);
    }

    /**
     * 条件查询
     *
     * @param dto
     */
    @Override
    public List<V> queryListByCondition(D dto, HttpServletRequest request) {
        return new ArrayList<>(1);
    }

    /**
     * 分页查询
     *
     * @param queryDto
     */
    @Override
    public PageBean<V> queryPageList(BaseQueryDto<D> queryDto) {
        return null;
    }

    /**
     * 分页查询
     *
     * @param queryDto
     */
    @Override
    public PageBean<V> queryPageList(KeywordQueryDto queryDto) {
        return null;
    }

    /**
     * 分页查询
     *
     * @param queryDto
     */
    @Override
    public PageBean<V> queryPageList(PageParam queryDto) {
        return null;
    }

    /**
     * 分页查询
     *
     * @param queryDto
     */
    @Override
    public PageBean<V> queryPageList(BaseQueryDto<D> queryDto, HttpServletRequest request) {
        return null;
    }

    @Override
    public int queryCount(D dto) {
        return 0;
    }

    @Override
    public V queryById(PK id) {
        return null;
    }
}
